﻿// JavaScript Document
var isIE7 = navigator.userAgent.search("MSIE 7") > -1; 
var isIE8 = navigator.userAgent.search("MSIE 8") > -1;

$(function(){
	
	if (isIE7 || isIE8) { 
		webViewerAttHandler();
	};
	
	//瀏覽器提示視窗
	function webViewerAttHandler(){
		
		 var winH = screen.height;
		 var winW = screen.width;
		 
		 $('<div id="webViewerBlackMsk"></div>').appendTo('body');
		 $('#webViewerBlackMsk').css({ width:winW, height:winH });
		 
		 $('<div id="webViewerAtt"></div>').appendTo('body');
		 //$('<ul><li><a href="http://goo.gl/Ys5dx" target="_blank"><img src="browerInfo/icon_chrome.png" ></a></li><li><a href="http://goo.gl/i9iV" target="_blank"><img src="browerInfo/icon_ff.png" ></a></li><li><a href="http://goo.gl/tDpB2" target="_blank"><img src="browerInfo/icon_ie.png" ></a></li></ul>').appendTo('#webViewerAtt');
		 
		 webViewPos();
		 
		 $(window).resize(function(e) {
			 webViewPos();
		 });
		
	};
	
	function webViewPos(){
		var winW = $(window).width();
		var winH = $(window).height();
		
		 $('#webViewerAtt').css({
			 top:winH/2 - $('#webViewerAtt').height()/2,
			 left:winW/2 - $('#webViewerAtt').width()/2
		 });
	};
	
});
